<?php

namespace App\Console\Commands\Tasks\Data;
use App\Repositories\DataSummaryRepository;
use Carbon\Carbon;
use Illuminate\Console\Command;

class SummaryDataRefresh extends Command
{
    //命令名
    protected $signature = 'task:summary-data-refresh';

    //命令描述
    protected $description = '刷新概览数据';

    // 业务处理
    public function handle()
    {
        $this->info("运行时间:" . date("Y-m-d H:i:s"));
        try {
            app("repo_data_summary")->refreshRedis();
            $this->info("刷新完成:" . date("Y-m-d H:i:s"));
        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
    }

}